<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/superfish.css">
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/superfish/superfish.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<?php echo $google_analytics; ?>
</head>
<body>
<div id="headerTop">
<div id="container">
<?php if ($isHome) { ?>
  <strong style="margin-left: 5px;float: left;"><?php echo $text_home; ?></strong>
<?php }else { ?>
  <a style="margin-left: 5px;float: left;" href="<?php echo $home; ?>"><?php echo $text_home; ?></a>
<?php } ?>
  <?php echo $language; ?>
  <?php echo $currency; ?>
  <div id="loginOrOut">
    <?php if (!$logged) { ?>
    	<?php echo $text_welcome; ?>
    <?php } else { ?>
    	<?php echo $text_logged; ?>
    <?php } ?>
  </div>
</div>
</div>
<div id="container">
<div id="header">
  <?php if ($logo) { ?>
  <div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
  <?php } ?>
  <?php echo $cart; ?>
</div>
<?php if ($categories) { ?>
<div id="menu">
  <ul id="headMenu" class="sf-menu">
    <li style="background: #7d7d7d;border:0;height:33px;"><a href="#" onclick="return false;" style="line-height:30px;margin-left:20px;color:white; font-size:15px; font-weight: bolder;"><?php echo $text_all_category; ?></a>
      <ul style="display: none;">
	    <?php foreach ($categories as $category) { ?>
	    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
	      <?php if ($category['children']) { ?>
	      <ul>
	      <?php foreach ($category['children'] as $category2) { ?>
	        <li><a href="<?php echo $category2['href']; ?>"><?php echo $category2['name']; ?></a>
	          <?php if ($category2['children']) { ?>
	          <ul>
		      <?php foreach ($category2['children'] as $category3) { ?>
		        <li><a href="<?php echo $category3['href']; ?>"><?php echo $category3['name']; ?></a></li>
		      <?php } ?>
		      </ul>
		      <?php } ?>
	        </li>
	      <?php } ?>
	      </ul>
	      <?php } ?>
	    </li>
	    <?php } ?>
	  </ul>
	</li>
  </ul>
  <div id="search" class="autoComplete">
    <div class="button-search"></div>
    <?php if ($keyword) { ?>
    <input type="text" name="keyword" value="<?php echo $keyword; ?>" autocomplete="off"/>
    <?php } else { ?>
    <input type="text" name="keyword" value="<?php echo $text_search; ?>" onclick="this.value = '';" autocomplete="off"/>
    <?php } ?>
    <ul><li></li></ul>
  </div>
</div>
<script type="text/javascript"><!--
$(document).ready(function(){
	jQuery('#headMenu').superfish();
});
//--></script>
<?php } ?>
<div id="notification"></div>
